import request from '@/config/axios'
import type { SalerPerformance } from './types'
import { TransactionDetail } from '@/api/transaction-detail/types'

export const getCashierPaymentsApi = (params: any): Promise<IResponse> => {
  return request.get({ url: '/report/cashier-payments', params })
}

export const getSalerPerformanceApi = (
  params: any
): Promise<IResponse<Array<SalerPerformance>>> => {
  return request.get({ url: '/report/saler-performance', params })
}

export const getCashierJournalApi = (
  params: any
): Promise<IResponse<IResData<TransactionDetail>>> => {
  return request.get({ url: '/report/cashier-journal', params })
}

export const getTransactionRebateApi = (params: any): Promise<IResponse> => {
  return request.get({ url: '/report/transaction-rebate', params })
}

export const getMemberCardChangesApi = (params: any): Promise<IResponse> => {
  return request.get({ url: '/report/member-card-changes', params })
}
